package csdn;

import java.util.Scanner;

/**
 * 项目名称：wangxu
 * 类 名 称：交换字符
 * 描 述：https://dream.blog.csdn.net/article/details/129548118
 * 创建时间：2023/4/13 07:25 下午
 * 创 建 人：wang-xu
 */
public class RealTopic09 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        try {
            String s = in.nextLine();
            if (s.isEmpty() || s.length() < 1 || s.length() > 1000 ){
                System.out.println("input error");
                return;
            }

            char[] chars = s.toCharArray();
            for (int i = 1; i < chars.length; i++) {
                while (chars[0] > chars[i]){
                    char c = chars[i] ;
                    chars[i] = chars[0];
                    chars[0] = c;
                }
            }
            StringBuilder sb = new StringBuilder();
            for (char c:chars) {
                sb.append(c);
            }
            System.out.println(sb);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
